
define([
           "dojo/_base/lang",
           "application",
           "applications/music_player/interface/main"
       ],

        function(lang, Application, MainWindow)
        {
            var app = Application;
            lang.mixin(app,
            {
                auid: 4569,
                name: "MyMusicPlayer",
                interfaces: [ MainWindow ],

                playPause: function(){
                    this.jsonRpcController.request( { method: "MusicController.playPause()", jsonrpc: "2.0",  auid: this.auid } );
                },

                stop: function(){
                   this.jsonRpcController.request( { method: "MusicController.stop()", jsonrpc: "2.0",  auid: this.auid } );
                },

                load: function(track)
                {
                   this.jsonRpcController.request( { method: "MusicController.load(QString)", jsonrpc: "2.0",  auid: this.auid, "params": [ track ]} );
                }

            });
            app.changeInterface(app.interfaces[0]);
            return app;
        }
);
